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

where otherwise good ideas go to waste

Haiku

Posted by Nicholas Chen Fri, 31 Mar 2006 01:08:34 GMT

Here are some Haiku that I wrote for my East-Asian Literature class. I had to choose one to submit but I will probably use the rest as part of my e-mail signatures in the future. I did not go through all of them so there might be some errors in the number of syllabus. Also, the raw HMTL is kind of bad since I was trying to use Textile in a weird manner.

Trusting a rodent

Punxsutawney Phil

Someone shoot that groundhog dead

Winter six more weeks


Summer Sweat

Mosquitoes flutter

Marshmallows and ghost stories

Rain puts out the fire


Web surfing

404 not found

Try using google.com

Page can’t be displayed


Missing

Waiting for room mate

Sad and lonely in the room

Dog came home instead


Spankin’ New Display

First snow, then silence

Display not found; drivers fail

Welcome to Windows


Snow flakes

Hot cocoa in hand

Ice flakes falling from the clouds

There is nothing but


Summer’s night

Crickets are chirping

Nuts and beer on the table

Men discuss their problems


Capybara

The capybara

It wanted to eat a worm

It bit its own tail


Spring

Wind caressing face

Flower and trees; twigs no more

Winter is gone, spring comes


The beggar

Lying in the streets

The pavement is his home now

What if it were you?


Return from the rain

Splatter, splatter, splat

Frogs and fish come out to play

Muddy prints on floor


Beach fun

SPF 15

Beautiful girls in short skirts

Look like red lobsters

Posted in | no comments |

Capybara

Posted by Nicholas Chen Sun, 19 Mar 2006 01:03:58 GMT

In my previous post, I said that my group was working on implementing a Jabber chat client on Squeak. Well, turns out that there might be a few implementations for Jabber on Squeak already. So having our final project be another Jabber client is kind of risky as the professor pointed out.

Instead of scrapping everything that we have written - we got it up to the point where it could login and send messages - we decided to make use of the Jabber protocol to send notifications to other computers. And that is where Capybara enters. Capybara, for those of you unfamiliar with the word, is

a South American mammal that resembles a giant, long-legged guinea pig. It lives in groups near water and is the largest living rodent
The name was chosen as a fun mockery of Squeak and its mouse logo. Who needs a mouse when you have the world's largest rodent?

So what is Capybara? I have written something about it on the class wiki but I thought that I would repeat some of it here in a less technical manner. Moreover, the information on the wiki might not persist over the semester. Here is another attempt at describing Capybara.

Imagine that you are using downloading a file in Squeak using a FTP client. The file that you are downloading is going to take a couple of minutes to download. You want to be notified of when the file completes its download but you do not want to monitor its progress by keeping watch on it. Enter Capybara. By registering the FTP client with Capybara and hooking up a file complete notification, the user will automatically be notified when a file completes via a discrete message box at the top right corner of the screen.

Or as another case. Assume that you are using the IRC client in Squeak. If you have ever used IRC before, you know that its "signal to noise ratio" is pretty low. Most of the time you will not be interested in what the other people are saying. However, if someone mentions a word that you are interested in, you would like to be notified of this. Enter Capybara. By registering the IRC application with Capybard and hooking up the detection of words to it, Capybara will send you a notification everytime the word you are interested in appears in the window.

The two scenarios above are just examples of when you would like to be notified about things that are of interests to you. With a computer capable of multitasking, there are so many events that are going off in the background. We need a way to be notified of those events in a non-intrusive manner. Capybara is our solution for that. The two examples you see above are local to the current computer but there are events that are going on other computers that you would like to know about as well.

Imagine that you and your colleague are collaborating on a programming effort. You would like to be notified whenever one of you has made a change to a file. By registering the application with Capybara and hooking it up so that whenever any changes are made, a notification is send, both parties know when the file has been modified.

So what does this mean for the user? As we have explained, it means that the user has a way to keep track of all the different information. Capybara also provides a way for users to control the propagation of information. No longer interested in what the program has to notify you off? Just turn on notifications for that program in the Capybara preference pane. In real life, being notified of when a new e-mail message arrives is not as important as knowing that you stock is falling rapidly. With this in mind, Capybara supports priorities for its notification messages.

What does this mean for a developer? It means that they not need to write their own notification engine. Capybara is application agnostic. Any application that uses our API can hook itself up for notification. No more clumsy user interface. All you need to do is register the application and hook up what to do when that event occurs. And if you really wanted a different notification interface, feel free to write one of your own. Capybara will support custom notifications as plug-ins as long as they support the API.

In short, Capybara is a nice framework for both developers and users alike. We do not claim credit for coming up with this idea. Instead this idea was inspired by two useful programs for OS X: Growl and LanOSD.

Posted in , | no comments |

Bioinformatics Summit at UIUC

Posted by Nicholas Chen Wed, 08 Mar 2006 19:14:11 GMT

Seminar: Bioinformatics Summit | News | Computer Science | UIUC:

"The Department of Computer Science will hold its first Bioinformatics Summit next week. We hope this will be a significant step in encouraging more interaction and increasing collaborative research among researchers on campus in the areas of bioinfomatics and computational biology."

Since this is the few times that I have been to a summit, I was curious to find out what usually transpires in one. The Oxford American Dictionary defines summit as:

a meeting between heads of government
Since this definition is not really pertinent to our scenario, I consulted the thesaurus and it revealed possible synonyms as meeting, negotiations, conference and talks. Basically, a summit is an event when people can talk about their work. In this case, it was also to help foster more interaction between researchers on campus specifically those from the Institute for Genomic Biology (IGB).

I attended the session on March 8. While it was a nice start, I felt that it could be better. Here's why:

  • A more tactful coordinator
    I felt that the coordinator was not up to the task. Instead of fostering conversations between the attendees, he was basically dominating the entire conversation with his questions. I understand that he is interested in what is being presented, but as an coordinator, he should exercise more tact and make sure that everyone has a chance to ask a question. Or he could ask "better" questions that might provide deeper insight into what kinds of collaborations that biological scientists would like to have with the CS department.
    Incidentally, Guy Kawasaki, posted about this today in How To Be a Great Moderator:
    "Make everyone else look smart. The goal of the moderator is to make the panelists look smart. It is not to make himself look smart--or grab the most attention. Moderators can make panelists look smart in two ways: first, give them a few softball questions that they can knock out of the park. For example, ‘What do you view as the most pressing issues of the industry?’ Second, extract good information out of the panelists by rephrasing, summarizing, or clarifying what they said. A good moderator accounts for only 10% of the speaking time of a panel--she is the ‘invisible hand,’ not the star."
  • Presentation from CS professors were missing
    This is probably excusable since it is the first summit. All the presenters were from the life sciences department. I would be interested to see how CS professors can contribute to the bioinformatics effort. From an outsider's point of view, it seems that there are very few professors that deal with bioinformatics in the CS department. So, it would be best to at least introduce some of their work.
  • No clear emphasis on what technology is needed
    At least that was how I felt about today's session. There was no clear explanation of what kinds of computing technology were needed to help foster the bioinformatics development. There was some mention of massive storage and fast parallel computation but the requirements were not detailed enough to follow up with a more formal analysis of what is needed. Then again, it is unfair to blame this on the presenters. As researchers from outside the CS department, we cannot assume that they are familiar with the computing technology that we have to offer. Therefore, it would be better if someone from the CS department itself accosted the presenters and at least give a suggestion of some possible technological solutions.

One way to solve the communication barrier (CS researchers are not familiar with a lot of terms from the biological world, and researchers from the biological world are not familiar with the technology in computers) is to have a walkthrough in the research lab. It could be in the CS lab or the IGB lab. It does not matter. Both groups just need to see what the other group needs and what they can provide. It's so much simpler than having to attend talks and lectures. Just go tour the lab for a few days and see what they need. I am sure that solutions, though not necessarily optimal ones, shall present themselves over time. Since the field of bioinformatics is relatively new, there aren't that many books written about the best practices of the field. In fact, I would be really wary of a book like that since the field is continually evolving and what you have this month would probably be supplanted by new technology very soon. That being said, there are still some books that could be useful. Look out for these books from O'Reilly.

Anyway, I am glad that the CS department in UIUC is making an effort to collaborate with the life sciences department. Bioinformatics per se is probably not going to be the next big thing in the future. However, its footprint might have a significant impact on other areas of computing. From my visit to Purdue University, I realize the importance of privacy when accessing this kinds of information. For instance, if company A wants to check some biological information with company B, it should not be able to access other data from company B. Similarly, company A should not be able to access any other information from company B. In short, the transaction should be transparent to both companies in the interest of corporate safety but at the same time, it should foster some kind of information sharing between the two companies since it is impossible for one company to hold all the information about all your clients.

Posted in | no comments |

MacBook Pro is finally here

Posted by Nicholas Chen Sat, 25 Feb 2006 03:42:32 GMT

Fast. Really fast. Especially since I was coming from a 867 MHz G4.

Instead of stating the obvious things that other people have already stated, let me point out some differences between this Mac and my old powerbook.

Good things first.

  • The keyboard feels much nicer to type on. It has this nice tactile feel to it. The keys just seem to bounce nicely.
  • The ambient sensor keyboard is the coolest thing around!
  • The screen is much brighter compared to my powerbook or even my 20.1 inch Dell Monitor.
  • The bigger track pad really works well. I feel like I have better control over the mouse.
  • Having the ports on the sides is actually pretty convenient. I don't have to bent over now to hook up my monitor. But since these ports are exposed, I wonder if they will gather dust fairly quickly.
  • The remote control for front row is really nice. I wonder what happens when the battery runs out though.
  • Having an iSight camera built-in is actually pretty useful.

Not so good things now.

  • The speakers sound a bit different - not in a better way. It is definitely louder but the sound seems a bit scratchy as well. The chime that the Mac makes whne it boots up sounds slightly different. But fortunately both left and right speakers are working.
  • I hate the slot loading CD/DVD drive. Yeah, it's cool but I always feel like it is going to die soon. When I inserted the provided DVD to install, the mechanical sounds it produces is enough to scare most people off.
  • The MacBook Pro feels rather warm to touch. I am not even running at highest performance but the keyboard area feels warm already. However the fan has not kicked in so that is fine since there isn't that annoying fan noise.

And now, it's back to installing software. I prefer to do this by hand instead of using the Migration Assistant because I feel like keeping my system clean and I really do want to keep track of which applications are universal binaries.

Posted in | no comments |

Any moment now...

Posted by Nicholas Chen Tue, 21 Feb 2006 17:21:20 GMT

Hello
We wanted to let you know that your order has shipped. If you ordered multiple items, you may receive separate shipments with no additional shipping charges. An invoice for your shipped products will be emailed to you shortly. Visit Order Status to review your order at any time. Best regards, The Apple Store Team

On another incident altogether, it is sad to note that Apple has not really fixed the Safari bug that surfaced a couple of months back. Basically, if you have the "Open "safe" files after downloading, you can potentially open something like a shell script that will run automatically. Last time, it was a Dashboard widget that would auto install itself. So Apple fixed that by popping up a notification telling you that a widget is trying to install itself. It was a temporary solution that worked for a very specific case.

However, this time around, it is possible to actually hide malicious scripts in a .zip file and have Safari open it automatically, It seems that all .zip files are considered to be safe? I might be wrong but that is what I have gathered from reading the news. Anyway, this is not too serious yet since you have to actually click on a .zip file to download it and after that you have to actually open the malicious shell script. But to unsuspecting users, the misnomer "safe file" might actually prompt them to click the file where otherwise they might have exercised more caution.

Simple solution, just turn off that option. I turn mine off because I hate it when it tries to open PowerPoint when I download a .ppt file. Opening PowerPoint on my powerbook takes a long time and I would rather download all the files first before opening any of them.

More information here. And a very detailed article on the deeper underlying principles behind this exploit can be found here.

Posted in | no comments |

Jabber and Squeak

Posted by Nicholas Chen Sat, 18 Feb 2006 20:35:19 GMT

The latest project that my group is working on is a Jabber client for Squeak. We have been toying with this for a couple of weeks now and we finally got it to send and receive messages to another contact on the same server. There are a lot of information on how to actually start a conversation with Jabber and most of them are easy to follow. In fact, here is a link to one of the better resources out here. Although I am not sure if you can actually quote strings in XML with single quotes. I changed all of them to double quotes since that is how I used them in XHTML but you are free to try them with single quotes. If you follow along, you should be able to connect to your Jabber server, authenticate yourself and even send a message to someone else connected to the Jabber server. But how would you actually receive a message from someone?

Now that is the interesting part. I was not able to find anything on how to actually receive messages once you have connected to the Jabber server. It does not seem to be an automatic thing. There was an elusive middle step that needed to be done. And this step does not seem to be elaborated on much in any website. So, falling back to the book Programming Jabber by O'Reilly, specifically, Chapter 5 which they have so kindly made available online.

Programming Jabber: Chapter 5: Jabber Technology Basics:

"The element is used to convey a Jabber entity's availability. An entity can be available, which means that it's connected and any messages sent to it will be delivered immediately, or it can be unavailable, which means that it's not connected, and any messages sent to it will be stored and delivered the next time a connection is made.

For the large part, it is the entity itself, not the Jabber server to which it connects, that controls the availability information. The Jabber server will communicate an entity's unavailabilityif that entity disconnects from the server but will do that only if the entity has communicated its availability beforehand."

So, the presence element it not set up by default. Even if your Jabber server identifies you as being online, it does not assume that you are available. And as such, all messages from other people are stored away temporarily. However, all server side messages are still going to be delivered.

So how you go about solving this? Reading a couple of paragraphs down shows that all you need to do, in the general case is to send this XML stream to the server:
< presence type="available" />

And then all your previous messages will come flooding through! Took us a while to figure it out but once we did, it kind of made sense. Just wished that all the examples online would have mentioned this explicitly.

Posted in , | no comments |

Squeak Revisited

Posted by Nicholas Chen Mon, 16 Jan 2006 00:51:54 GMT

Using Squeak is imminent. So I might as well make the most of it. At first, the experience was horrendous. The syntax of SmallTalk itself is fine since I know both Objective-C and Ruby, both languages that derive themselves heavily from SmallTalk. The problem lies with Squeak itself. I found it almost impossible to control intuitively (read: meaning without reading some manual) on my PowerBook. After all, there is only ONE mouse button on my notebook!

I used Cincom VisualWorks before and it did not trouble me as much since there was some good introduction available. Not to mention the presence of toolbars so I did not need to bring up the contextual menu. But Squeak seems to have more plug-ins and multimedia stuff available. Also, Squeak will be used for the class that I am taking.

So to the rescue, are two very nicely written short articles.

By the way, the guy who wrote the second tutorial comes from Duke and was an intern at Fog Creek Software, which another of my favorite tech writers, Joel Spolsky, owns.

So if 2005 was the year that I learned LISP (and did not use it much in the end thanks to the fact that my A.I. class adopted Java!), 2006 will be the year that I learn SmallTalk. So far, what I really like about Smalltalk is how terse the language itself is. Also, I like the dynamic nature of the environment since any changes that are made, including installing new plug-ins, are immediately effective.

Still the potential for screwing the entire image is there since I am still not too familiar with how Squeak maintains different instances of itself. Different instances as in .image files and not a different project or workspace.

Posted in , | no comments |

MacBook Pro

Posted by Nicholas Chen Fri, 13 Jan 2006 16:35:00 GMT

It was kind of tongue-in-cheek for Apple to release the MacBook Pro with the caption "wishes do come true". However, it is indeed a wish come true. If you recall, a couple of months back I was lamenting the fact that you still could not get a powerful machine even if you had a fortune to spend on Apple. Well, right now, at least we have something that is at least on par with most machines. It is not top of the line, since there are indeed faster core duo specs on other machines but you must admit, the speed difference is rather significant. True, there are a lot of features that might be missing, such as the following (some might be rumors since I could not get official confirmation):

  • No S-Video
  • No modem
  • No Sudden Motion Sensor (?) - UPDATE: Yes it does have it
  • 60 pixels reduction in height: 1440 x 900 (was previously 960)
  • GraphicsConverter not pre-installed on the machines.
  • Slower dvd/cd drive

What should run, natively (not using Rosetta):

Most of them already have universal binaries so everything is fine. Applications such as Adobe Photoshop and Microsoft Word that I use occasionally can run under Rosetta and I will not complain.

What extra accessories I might need to get:

  • Modem
  • S-Video adapter
  • iWork (mostly for Keynote so that I can use the remote)

Either way, I should be ordering my own MacBook soon.

Posted in | no comments |

What this semester has taught me

Posted by Nicholas Chen Fri, 23 Dec 2005 05:41:39 GMT

It's that time of the year again where I reflect on what I have learned for this semester. This semester has been relatively kind to me with no subject too dull or difficult. Also, this was the semester where I had to practice for the GRE and complete my graduate school applications. In addition, I was also an undergraduate teaching assistant for two classes and these two jobs consumed more than 12 hours of my week.

But I am glad that I took the classes that I did.

  • ART 140: Introduction to Art
    After taking this class, at least now I can claim to know more 20th century artists and begin to appreciate art in a new light. Formerly my knowledge of art history was really limited, but right now, I am confident enough to go to an art museum and understand and appreciate the terms that are used to describe a masterpiece. Also, I think I am capable of identifying different painting styles. But now that I think of it, knowing the nomenclature does not really make the ugly art any better than it is. The selection of topics was thorough enough and the field trips that we had were interesting. The only bad thing was the disorganized nature of the course toward the end of the semester; the lecturer decided to just drop some of the materials from the schedule because she had not plan her schedule properly. In addition, the grading scheme for the exams was too subjective and involved too much writing. Moreover, there were 4 exams and 3 papers. Even though the grading was rather lenient, it was still a lot of work for a 3 credit hour course. Nonetheless, I am glad that I took it.
  • CS475: Formal Models of Computation
    Decided to take this class to fulfill my Math minor. It is reputed to be one of the harder undergraduate courses for Computer Science majors. Though there were parts of the course that still elude me, I am glad that I took this course, for the simple reason that I managed to survive it and did rather well for it in the end. Also, though most of the theories taught will never be used by me directly, those theories are enlightening in a sense. When someone talks about computational complexity at least I am able to comprehend what is involved.
  • CS431: Embedded Systems
    An interesting course and one that is really useful. The focus of the course was on programming on the ATMega16 chip connected to a board that provides serial communication, joy stick support, LCD module and connection to a digital to analog converter. The lab work was done in the C programming language and some of the assignments involved writing code for Linux. The 10 labs were interesting, with the last few labs requiring a program that can automatically balance a swing by draining and filling water on either sides of it. The class covered basic Fourier Transform, PID controllers, Rate-Monotonic scheduling and POSIX programming. I feel that I left the class knowing a lot more on how to actually program for an embedded device with its limited processor and memory. Somehow, dealing with low level stuff still strikes me as being more interesting than programming for Eclipse.
  • CS 397: Motes project
    An ongoing project that involves more embedded systems programming. It involves interfacing what I did in the embedded systems class with Mica2 motes to exploit their wireless capabilities. See my previous entries for more information.
  • CS397: Photran project
    Involves dwelling into the heart of the Eclipse IDE and writing a plugin for it. Unsurprisingly, the plug-in is called Photran and serves to make Fortran programmer's slightly happier. The first thing I have to admit, I do not really get the Eclipse framework. It seems that it has been overly abstracted that only a few people understand what is going on. And even with those abstractions, the core of it is still constantly evolving so much so that the difference between version 3.0 and 3.1 can actually break your code. And did I say that it is painfully slow to work with? In fact I cannot even develop this project on my powerbook because of the power hungry nature of Eclipse. What I do like is the fact that I managed to tackle this behemoth project rather well and was able to produce a decent text editor that people are actually using for Fortran development. In addition, I even subscribe to the mailing list and fix bugs. This is about as close as I have gotten to a real open source project where people from around the world give their support. So sometimes when I hear people giving feedback on the mailing list, it does raise my spirits a bit.

Nevertheless, as aforementioned, this semester has been a fun semester for me. There was nothing that I particularly loather, even though the Photran project did get on my nerves once in a while. Next semester would also be fun. I will be taking a graduate level course on object-oriented design taught by Prof. Ralph Johnson, co-author of the famous Design Patterns book. I have browsed through some of the syllabus from past semesters and am beginning to learn Smalltalk using VisualWorks. I tried using Squeak but all the multimedia stuff was too distracting.

While the IDE for Smalltalk definitely need some polishing, there is nothing wrong with the language itself. In fact its syntax is so simple, that it can easily fit within a postcard!

Also, I will be taking ECE411, something that I am not terribly interested in because I really do not like VHDL.

Anyway, next semester will be my last as an undergraduate so I will try to accomplish as much as possible and hopefully have some fun as well.

Posted in , | no comments |

Working on Berkeley Mica2 Mote

Posted by Nicholas Chen Sat, 03 Dec 2005 07:12:03 GMT

My latest project involves making use of what we have learned in our Embedded Systems class and interfacing it with the Berkeley Mica2 Mote. The mote is definitely capable of more advanced stuff but right now it is just being used to transmit information wirelessly to one another.

Mica2 Mote
Mica2 Mote

In a nutshell, this project involves two mote and two AVRBoards. One mote and one AVRBoard make a complete node. So we have two nodes in our scenario. One node will measure the angle of a seesaw and send that measurement to the other node. Based on the sent value, the other node will compute a value to be send to the water pumps to either drain or fill water into the seesaw so that it balances itself. The value computed will be based on a simple PID controller feedback system.

AVRBoard
AVRBoard showing the values of the PID controller.

Designing the PID controller was already done in a previous lab assignment and was not too hard. What I needed to do was interface the motes with the AVRBoard.

Programming board to interface with the mote
Mote programming board with no mote connected.

By itself, the motes has no way of connecting to the AVRBoard. Instead what we need is to place the mote on a programming board. This programming board features a serial port and a parallel port. The parallel port is used to "program" the mote; that is we send a .hex file to the mote that tells it how to function. For the first stage of the project, one of the motes will be configured to send out a sine wave and the other will be configured to function as a receiver. The wireless signal is based on an implementation of RFC 1663 protocol. The settings for this connection is 57600/8/1/NONE.

The main issue I had over the past few days was getting the programming board connected with the AVRBoard. Both of them have a male-type serial port. At first I thought that just having a converter for a standard serial cable would work. However, it does not. I only realize the problem after consulting with my previous project working with the serial port for another class. What I needed was a null modem. It basically switched the pins that are used for transmitting and receiving so that the communications can go through.

Completed setup
Mote connected placed on the programming board and connected to a serial cable.

So at this stage, I am able to communicate between the sender mote and the receiver mtoe and plot the result on the AVRBoard. The next stage will involve actually marshalling packets to be send over the wireless network.

Posted in , | no comments |