Harry Potter
Unless you have been living under a rock - or just could not be bothered - you would have at least heard the news that the 7th and final book of the Harry Potter series has been released much to the delightfully anticipation and solemn realization of many. Delightful since this is the concluding book; and solemn since it marks the ending of a tale that has spanned a decade.
Truth be told, I was not an early fan of the Harry Potter series. In fact I had merely dismissed it as another work of fiction when the first book appeared during my teens. I am not one who enjoy modern works of fiction since I have found them to be rather shallow in nature. However, as a kid, I did however remember reading the works of Enid Blyton and thoroughly enjoyed them. When I hit my teens most modern fiction books out there really began to feel repetitious with heavy borrowing from one another. And there never was a compelling series to commit myself to.
My interest in Harry Potter only started during the long holidays when I was done with school. In my country, that mean after the exams that one has to take during Form 5. By that time, four Harry Potter books have already been released. My mom had somehow procured them from one of her friend's daughter who was studying overseas. Moreover, by this time, I was curious about the hype and controversy that the Potter series had spawned. The hype was undeniable so much so that one of my more radical church friends (forgive him as he was (is still?) young and naive), brainwashed by his church, condemned the book as a vessel for demonic works.
It was by reading the four books in my hands at that time that I think I understood how Harry Potter could captivate the hearts of children and adults alike. There was an endearing quality to it. It did not dismiss the acts of violence as most other children's book would have done; neither did it superficially inject violence into the series. Sacrifices do have to be made sometimes for the greater good. Moreover, its conversations were not cloaked under the shroud of pretense: adult conversations (be they muggles or wizards) will always be punctuated with implied swearing. It is this honesty that separates this book from the works of the other authors who try too hard and yet at the same time, reveal too little human nature.
Anyway, it was certainly fun reading the last installment of the series. I was determined to finish it as soon as possible to avoid the possibility that my girlfriend would spoilt the ending for me. She has already attempted to do so by flipping to the last few pages of the book and reading the text aloud. Without spoiling it for anyone else, I would say that the ending brought a nice satisfactory conclusion to the series. It was a most appropriate ending after the midst of sadness that had transpired during the last few books of the series.
Now, if you'd excuse me, I must search for some other series to follow.
Posted in college stuff, readings | no comments |
iPhone
The iPhone was released at an opportune time. I was already waiting for something to replace my Razr. I was generally happy with my Razr (as I am with most electronic devices with the exception of a computer running Windows Vista but that is a story for another time). Probably because I read the manual before using it, I usually know what I am doing; thus, nothing disastrous has happened. This is rather miraculous since the Razr has one of the worst user interfaces out there. This applies to Motorola phones in general and is attested by many other people including friends from the Human Computer Interaction group.
However, I was also waiting for something more user friendly. It was almost impossible to use my phone for any other thing except for calling and basic SMS. Some would say that this is sufficient and yes if those are your needs then indeed it is sufficient. Nonetheless, with the current technology, I believe that there is something more that you can actually do with your phone. And that there is a way to do it without making things more complicated than they need to be. That is where the iPhone comes in.
Initially I was reluctant on getting one. After all, it is pretty expensive. And I already had a fully functional iPod that I am very happy with. However, after watching the videos (I did not even bother actually testing one hands-on when I was at the shop since I had confidence that it would work as advertised - a faith that is currently only bestowed upon Apple products) I was convinced that it would be a useful gadget to acquire; that it would make my life easier just like acquiring an secondary external monitor or the Griffin elevator.
The only thing that I am worried about is the customer service from AT&T. My previous carrier was T-Mobile and I had great experiences with their customer service. They were always friendly and provided real assistance without wasting my time or making things harder than they need be. I had heard terrible tales of bad customer service from AT&T and I was worried that I would have to suffer through that for the duration of my contract - two years mind you! I finally convinced myself that since AT&T is Apple's partner in this, it should not be too bad lest they want to face the wrath of every Apple fanboy out there ; )
On the day the iPhone launched, I tried to just casually go to the sole AT&T store that was carrying the device in my area. Needless to say, such optimistic actions were met with a line that was 50 people strong! I was last in line and did not manage to get the phone on its launch day. Surprisingly, the people who were first in line were not CS or ECE graduate students - something that you would expect from a campus town. Instead they were middle-age people who did not seem like the crowd that the iPhone would appeal to. Furthermore, these middle-age people were not just there to take a look; they came, they saw, they bought! One each. Amazing.
Fortunately, I happened to be going down to Chicago the next day and could grab one from the Apple Store off North Michigan Avenue. I was in and out in 10 minutes without any hassle. I even manage to start the activation process using the wireless connection offered in the Apple Store. And, surprisingly, I ran into very few problems activating my phone. I was even able to port my number over from T-Mobile. Calling AT&T was also surprisingly pleasant. They answered my calls professionally even in the midst of all the chaos that the iPhone has rippled.
I believe that the iPhone will actually change the way that other cell phones are created. Like my girlfriend said, this is one device that you will have to refer by name: "I am going to make a call on my iPhone" not "I am going to make a call on my cell phone". Now that is product loyalty.
Posted in college stuff | no comments |
Changing the way programmers program
I was fortunate enough to attend a very interesting talk by Professor Brad Myers of Carnegie Mellon University on the topic of natural programming. Natural programming is a broad term and there can be a lot of spurious claims about what is natural so Myers actually narrows what the term means by using user studies on programmers. By doing so, he was able to actually observer the real behavior of programmers instead of naively relying on what intuition might say otherwise.
Myers managed to cover a lot of ground (it is a shame that the lecture was not recorded but fortunately a lot of the topics he touched on can be found at the CMU HCI! website). Here are some of my thoughts on some topics which really intrigued me. Hopefully I provide enough context so that people who did not go to the talk can actually understand what I am trying to say.
- User studies Myers's group did not waste time trying to come up with sophisticated tools to record how programmers work. They did not create some heavy-weight plugin for the IDE. Instead, they used a video recorded and/or a screen capture device. This leads to a lot of data that has to be analyzed but at least everything is captured. I think that in such studies, it is really important to record everything that the user is doing. Contrast this to using your own recording plug-in tool. Your tool probably records what you are interested in only (meaning your tool is probably biased) and ignores the rest. Therefore, you are not able to truly observer the real behavior of the programmers. The downside of using the video capture tool would be the sheer amount of man power that is required to analyze and distill the information.
- Starting small A lot of people were skeptical of the results shown in the lecture. Most of the examples have been done using what some would call a toy environment. For instance, there was a demo of WHYLINE using the Alice environment. The results of the WHYLINE was pretty impressive but there were a lot of questions on whether the results would be beneficial to a real programming environment. First of all, it is pretty important to realize that something like this has never been done before. So there is no data to suggest whether this will succeed or fail. The only way to find out is to construct a system to test it. When you are doing research in uncharted territory, you usually start small and then build up on your previous results. I believe that it is important to realize the importance of the paradigm shift brought upon by Myers research. His WHYLINE approach might not extend directly to other programming environments but at least he has shown that there exists viable alternatives to how we have been debugging for the previous decades.
- Improving the text editor. The text editor in most IDEs are really abysmal. They only support the most minimal of word editing operations. I really like the clustering idea that Myers presented (he did not actually use the term clustering but I feel that it is a suitable term). Programming activities seldom involve just one file. Usually it involves reading a couple of files and making small changes to them. There are at least two things that makes this form of editing complicated in current IDEs. First, it is very hard to locate the relevant files because there might not be direct dependencies between the files. For instance, most functionalities of a program are scattered across multiples files that might not exist in the same form (some parts could be documentation files, some configuration files, some files that are in different languages). Second, once you do locate the relevant files, how do you keep the relation between those files clear. For instance, how can you tell or record in your IDE that those files are related so that the next time you work on a similar task, you would like your IDE to show those related files again and more importantly remind you of what the relation between those files were.
HCI is a broad topic and not everything about it interests me. There are certain parts of it that strike me as being too vague but there are other parts like improving the programming environment that seem really interesting and doable. The topic of natural programming is becoming more important because (based on the data Myers showed) in the next couple of years, everyone who uses a computer will undoubtedly be doing some form of programming no matter how simple.
The computer has become powerful enough that it will be able to support a lot of things that people did not think were possible many years ago. It is visionary research like this that will help us make full use of future computers. I'll definitely be monitoring what Myers's group can come up with next.
Posted in college stuff |
Getting the gist through to students
There is an interesting paper by Prof. Michael Loui, Prof. Craig Zilles and J.T. Longino entitled Student Misconceptions in an Introductory Logic Design Course.. It's pretty short -- 12 pages -- but it covers a lot of ground. It shows that there are indeed concepts in Logic Design that most students miss. In fact, I will admit, that there are some concepts that I missed when I took that course as an undergraduate.
While the paper does describe and analyze some misconceptions that students have, I felt that the main reason that some students do not get Logic Design is because they become overwhelmed by the homework. I remember having lots of homework for the ECE class that I took and it took a lot of time to complete them. Even after completing them and having them handed back, sometimes I was not really sure whether my answer was the best approach to solving the problem. While answers are provided for those homework questions, we did not always go through the process of coming up with those answers. We will see the step-by-step solution by there was no justification why that method was chosen (or how that method was synthesized). It would have been better if the lecturer went through some of the harder problems and show how to solve it. Preferably, this would be a live session with pen and transparencies over the projector. It would be even better if it could be recorded so the student can replay this later when they were revising.
Lecturers should seriously avoid doing too much hand-waving while solving those problems. I have found that class with a lot of hand-waving are the most frustrating classes that I have taken. Classes that utilize only PowerPoint slides also tend to be less interesting that those that use normal chalkboard or even transparencies. It is important that each step for approaching the problem domain is properly articulated for the new students.
From my own experience, sometimes, the homework problems seem so repetitious. There was no mention of the motivation for doing those homework problems. Sometimes it was more of doing it for the sake of doing it. The lab component was particularly useless since it focused more on how to use the tool (click, drag, type) instead of showing why people would use those tools. And those tools were too cumbersome to be used for most problems.
For the programming course that I am teaching, I try to motivate deeper understanding by asking students how they approach the problem. It does not matter if the approach is simplistic or naive-- what is important is that the approach works. Getting a working program is important because it forces you to actually get all the details in. It is simple to have a high-level overview of the solution but until you implement it, a lot of details can be easily overlooked. In discussion section, we would then discuss the merits of each approach. I usually have my own solution which I would use as the base for comparison purposes. Students then get another week to make improvements to their program following the discussion that we had. I have found that
I discourage complicated solutions that utilize a lot of heavyweight frameworks or libraries. I made the assignment so that they can be easily solved using basic C/C++/Java knowledge from a prior 100 or 200 level course. Using frameworks hides a lot of the implementation details and makes for a rather terse discussion section. Unless other students are familiar with the framework, what they say will not make sense to the other students. I believe that if you understand the basics, using any framework will be almost trivial (except for those that require proprietary components which must be purchased separately).
I also try to make the examples more motivating that a typical machine problem. Machine problems tend to be really boring. They usually focus on only one concept and do not require much thinking on the part of the student. Some of the machine problems are also either hit-or-miss: meaning that they only have one solution. That hinders students from trying to experiment with their own solutions. Instead, they are more concerned if their solution is the right solution. My machine problems tend to involve lots of visual feedback: images, graphics, interaction. This is based on my own motivation for doing computer science: so that I can create all those cool programs like games, applications, etc. Without this intrinsic motivation, students are less likely to have fun doing the machine problems. I have yet to hear students from other classes calling their machine problems fun.
I realize that it is easier to make programming classes more fun that Logic Design. After all, a lot of the jargon that we use -- XML, Object-Oriented Design, GUI, etc. -- have become rather common parlance for most computer-savvy kids. And there is an abundance of open-source projects where students can actually contribute and draw examples from. But for Logic Design, concepts like duality, Karnaugh Maps, sum-of-products are less well-known. More effort has to be to be taken to motivate the importance of such concepts. It is a shame that there are few open source projects on Logic Design (I might be wrong on this but I have to find anything called logicdesignfourge.net as compared to sourceforge.net
Posted in college stuff | no comments |
Zune
Q&A: Jobs on iPod's Cultural Impact - Newsweek Technology - MSNBC.com:
"In a word, no. I've seen the demonstrations on the Internet about how you can find another person using a Zune and give them a song they can play three times. It takes forever. By the time you've gone through all that, the girl's got up and left! You're much better off to take one of your earbuds out and put it in her ear. Then you're connected with about two feet of headphone cable."
You gotta respect Steve Jobs. With just that one sentence, he has made Zune's main marketing tactic (the ability to share songs wirelessly) sound pathetic. Now anyone who had originally planned to get a Zune will be reminded of this sentence every time they try to send a song to the girl sitting next to them.
Posted in college stuff, web pages | no comments |
Nested comments in PHP
This article has two main reasons. The first is to show how to use the foreign key constraints on MySQL 5 and how to do a CASCADE DELETE and how to use PHP to display nested comments. The interesting thing here is that I do not do multiple SQL queries to fetch the children of each message. Instead, I retrieve all the comments for the page and rely on PHP to do the formating and sorting.
The second reason being that I want to see how resoureces work in Typo because this is a feature that I have not used before. I need to at least know if it is working before I start documenting on it. So I have uploaded the files that show how to design the sql tables and how to do the retrieval in PHP.
A subreason would be to try out writing this article from within Typo itself and see how well it goes.
Here are the files:
- comments.html: the PHP file that shows how to connect to the database and retrieve the data. And then there is a function that recursively displays the messages in a nested manner.
- data.html: the SQL file that shows you how to set up the database in MySQL 5 to make use of referential integrity. It also populates some data into the table so that you can try it out.
Update: Here are my reactions (writing from within Marsedit)
The resources that are associated with this post, gets included as an attachment to the RSS feed for the post. This is kind of like an enclosure. Safari's RSS can detect this enclosure fine but the built-in reader in Flock just ignores it. Also, the resources do not appear in the page when viewing the article. So basically the attachment is only useful for RSS readers.
There is a weird UI bug. You can add additional resources that exists on the server (as attachments) to the post IF you have already associated at least one attachment to the article. If you have not associate any attachment, then you cannot attach an existing resource as an attachment.
Posted in college stuff, development | no comments |
Logitech MX revolution
Got a new mouse. It's supposed to be a really good mouse with the best scroll wheel out there. The reviews so far have been pretty good but nothing spectacular about it. And after a few hours of using it, I think I like it a lot too.
I have been using a Logitech mouse for some time now and it really feels comfortable in my hand. I had originally planned on buying a Apple Mighty Mouse but dropped the idea since it did not feel nice in my palm. The bluetooth connectivity and laser tracker were nice features in the Might Mouse but the shape was really horrible. It was hard to hold for longer periods and the tiny scroll "nipple" was too small to use properly. Moreover, the side buttons that were meant to be squeezed were not ergonomic at all.
There is another version of the revolution mouse: the VX revolution. That is supposed to be more portable since it is advertised as a laptop mouse. I tried it too but it felt too small to be gripped comfortably. So in the end I forked out $20 more for the MX revolution. No point in trying to save some money when the more expensive one feels so much better.
The only problem I had with this product is the configuration software that Logitech provided. It's the Logitech Control Center and it is a fine piece of broken software. It's previous version LCC2.0 worked fine for my Logitech keyboard but the current version LCC2.1 is a disaster. I cannot even open the keyboard configuration pane without the pane crashing on me. This is not an isolated case since other people have been reporting this problem too. To make matters worse, this control panel installs the APE application for OS X. If you want to use the mouse then you just have to bear with it. I really hate this but there is nothing that can be done since this mouse has very specific properties that only Logitech can configure.
Fortunately, there was not much that I needed to configure on the keyboard. For some of the smart buttons, I just edited the .plist file by hand and reloaded the keyboard driver. More information on how to do this can be found here. Editing the .plist file by hand was really a fun thing to do. You never know when you will break the XML that the file uses.
Apart from the $100 price tag, this mouse is very usable. I like the fact that it comes with a charging station so I do not need to constantly be searching for batteries. Also, the buttons do not require a lot of force to activate. I would prefer if the mouse was less noisy (click, click, click) when scrolling in precision mode. This mouse offers two mode for scrolling: precision mode and free spin mode. In precision mode, it works just like a normal scroll mouse would. But in free spin mode, the scroll wheel disengages from the ratchet and scrolls really fast. The mouse is smart enough to detect when to change modes based on how fast you are moving the wheel. However, engaging and disengaging the ratchet makes loud click sounds that I felt should have been softer.
All in all, this mouse is nice and if you are planning to be in front of your computer for hours a day scrolling through long documents, you should consider getting one. And it is not that bulky that you cannot carry it around with you when you are on the go.
Posted in college stuff | no comments |
Owner of new fish
In an series of unlikely events, I am now the owner of 3 fish: two guppies and a algae eater and 2 water frogs. All 5 puny animals reside on a hexagon aquarium in the middle of the sitting room.
You can find more pictures of these fish, if you are so inclined, here.
What's really funny is that the "fish lady" at PetSmart strongly prohibited my girl friend from buying any fish larger than a quarter. She claims that the aquarium is much too small for anything larger than that. And 5 is like the upper limit on the number of aquatic creatures for that aquarium.
Posted in college stuff | no comments |
Installing Vim 7 on CSIL machines
Vim 7 has been released for a few months but the machines in the CSIl labs here still have the older 6.3 version. Now, there is nothing wrong with version 6.3. Except that it does not have tabs, does not have built-in spelling checker, does not have that nice omni-complete feature and not to mention that it does not work well with my .vimrc file since I tuned it for version 7.
Here's what you need to do. This is not specific to the CSIL machines and should work with any linux installation.
- Create a directory called downloads in your home directory using
mkdir download - Grab the latest vim source from here and stick it into the download directory. Just use Firefox or Konqueror to browse to that site.
- Untar the file by running
tar jxvf vim-7.0.tar.bz2 - Do
cd vim70/src - You have to modify the Makefile a bit to get it to install in your home directory. Look for the line (around line 853) that has says "prefix = $(HOME)". Uncomment it. This will install Vim in folder /bin in your home directory,
- Do
cd ..to get back to the vim70 directory. Then do
./configure
make
make install - There should not be any errors and it takes less than 5 minutes to compile on the newer csil-core machines.
- The final step is to get your newly installed version of Vim to run instead of the old one. Add the lines set path = ($path $HOME/bin ) to your .cshrc file. You can edit the .cshrc file by doing
cd ; vim .cshrc - Do
source .cshrc. - Now you can type vim or gvim in the terminal and it will run the new Vim 7.0
Now that you have Vim 7.0 installed, go look at what you can with it. Also, grab some color schemes from here to make the syntax highlighting slightly nicer. Another good tool to have for code editing is the taglist plugin
.
Posted in college stuff, software | no comments |
