January 28, 2009

CS100 is history!

CS100 finals are past and grades are given. Unfortunately, we had an eventful final. The final rooms were changed by Exam Coordination Office without telling me about it. So, me and the students went to the previously assigned rooms, while the proctors and a bunch of the students went to the correct rooms. Only after 15 minutes into the exam, I could learn about this change and redirected all students to the new rooms. We started the exam 30 minutes late, but the rest of the day was problem free.

I am not very pleased with the results of the final. Considering that all the possible multiple choice and short essay questions were published on the web beforehand, I was expecting a higher average. It appears, some students are willing to take the course for a second (or third?) time. Maybe they just like to be in my class, who knows? :)

To all who got a passing mark: BIG CONGRATULATIONS! You worked hard and deserved every point of it. I hope the things you learned in this course will help you in your life. I would love to help you in the future whenever you have a problem about computers in general. So, don't hesitate to drop by my office next term. Yes, I will have an office in the university next term. Don't forget to check my web page to hear about it.

Take care, and have a happy and relaxing holiday!

January 16, 2009

End of the Term

Well, the first term is over. It is now time for the final exams. I hope everybody (AKA students) is happy at this point. I wish you all an efficient and productive preparation period. Good luck in the finals!

A Familiar Conversation

"Advancement" of Civilization

This picture pretty much sums it up (unfortunately):

"Best" Free Windows Software of 2008

To all of you who are still a prisoner in the clutches of Microsoft: this page has some exciting free software titles that could somehow make your Windows shine!

last.fm and Rhythmbox

I am guessing that most of you geeks out there already know this simple trick, but for the less Web 2.0 aware community out there: last.fm is the ultimate online music experience! Just sign up with them for free and start listening to the best music on the planet. What makes this creme de la creme is its absolutely easy integration with Rhythmbox (default music player in Ubuntu). Once you sign up for an account at last.fm, open Rhythmbox, go to Edit/Plugins and choose and configure the last.fm plugin. That's it! You can now start listening to your favorite music from within Rhythmbox. You can search based on artists and tags or you can join one of the groups. Your search results will be immediately turned into a radio that you can listen to. And cheer up, all of this for free! [Assuming you are being nice and using Linux, that is]

I started working on Zindan

I finally gave start to my first Java Roguelike: Zindan. With my currently bloated schedule, I don't know how much time I will be able to spare to work on this project, but I had to start it at some point. Considering that in the next term I will be teaching an IE course, I may fast drift away from the world of programming unless I hone my skills frequently with this kind of toy projects.

Well, actually this is not 'planned' to be a toy project, but a real, very playable roguelike at the end. I have been playing roguelikes for years by now. Clearly, the beauty of a roguelike is not the interface but the inner game mechanics. How items interact with each other, how creatures behave, how players survive in unexpected ways are the key elements of success for a roguelike. Therefore, my goal will be to produce a very flexible game core which allows even unexpected actions to be realized both by the player and the NPCs. Ofcourse, this is not a simple task. And even I don't know how I am going to do that. But in time, each piece will fall into place and things will be more clear. My first goal is to create the skeleton of the project, including all base classes for creatures and items, IO classes and level generators.

This is going to be one hell of a quest to complete!

Fixing Wireless Transmission Rate in Ubuntu Intrepid Ibex

Yet another problem I had with Intrepid was extremely bad performance from my wireless PCI card. Confusingly, the wireless card is recognized by default and no special handling seems to be necessary to use it. It connects to my router perfectly fine and I can browse the web. However, the performance is terrible. The same card, when dualbooted into XP, gives me excellent signal reception and maximum browsing speeds. In Intrepid, browsing is a real PIA most of the time.

Apparently, the problem is a faulty transmission rate assignment by iwconfig. If you observe extremely bad browsing performance, open the terminal and type
iwconfig

You will most probably see something very similar to the following:
wlan0 IEEE 802.11bg ESSID:"Burkay"
Mode:Managed Frequency:2.437 GHz Access Point: 00:12:BF:67:8C:75
Bit Rate=1 Mb/s Tx-Power=27 dBm
Retry min limit:7 RTS thr:off Fragment thr=2352 B
Power Management:off
Link Quality=69/100 Signal level:-63 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
Here, wlan0 is the name of your wireless device, and Bit Rate is the maximum transmission speed your card can realize. However, unless you have an ancient system and a prehistoric network, your card can support at least 54 Mb/s. You can see that at the moment the card seems to support only 1 Mb/s, an obvious trouble. In order to fix this problem, you simply have to force iwconfig to use 54 Mb/s as the bit rate. To do this, first open /etc/network/interfaces in gedit:
sudo gedit /etc/network/interfaces

Now add the following line to the end of the file:
pre-up iwconfig wlan0 rate 54M

If your card has a different name than wlan0 then don't forget to fix the above line by using the proper name. This makes sure that after the next restart your wireless interface will be forced to run at 54 Mb/s. At least this fixed my card and now, once again, I can browse at full speed.

Fixing Mouse Mapping in Ubuntu Intrepid Ibex

So far Intrepid is behaving wonderfully both in my desktop PC and my laptop. However, there are minor annoyances similar to all the previous versions. One issue that really bothered me was not being able to re-map the buttons on my mouse. If you have a 2 or 3 button mouse, that may not be a big problem for you. Intrepid handles your mouse as good as you may want. However, I am using an Intellimouse Explorer 2.0, which has 2 side buttons on the left. Moreover, the scroll wheel can be tilted left and right to do horizontal scrolling. What really bugs me with this mouse is that the middle mouse click is normally assigned to the wheel. In other words you must click the wheel for a middle mouse click. Well, this is what many other companies do. But, Microsoft decided to make the wheel as unclickable as possible. You really need to exert some force on the wheel to be able to click. But this unreasonable force usually results in the mouse cursor moving somewhere else before I can realize the click. Long story short, I normally assign one of the side buttons as the middle mouse click, which is way more easier to click when compared to the wheel. In versions before Intrepid, you can easily do this by altering the xorg.conf file. However, starting with Intrepid, the input devices are handled by the HAL and not XOrg. This means, your xorg.conf tricks are not worth a buck anymore. Fortunately, a not so-popular but easy to apply solution exists. All you have to do is to create a file named .xmodmap in your home directory. Now, open this file with gedit:
gedit .xmodmap

and type the following into your file:
pointer = 1 8 3 4 5 6 7 2 9

Then, save, exit and restart. As you can guess easily, this makes button 2 behave like button 8, and button 8 behave like button 2. Button 2 is my wheel click and button 8 is my first left side button. So, after this change the left side button click corresponds to a middle click. Bingo!