Saliya's Blogs

Mostly technical stuff with some interesting moments of life

FireFox Keyboard Shortcuts

Great! Now I can stop using mouse for the most part of browsing.

http://support.mozilla.com/en-US/kb/Keyboard+shortcuts

Internet Speed: Isn't this nice?

In Sri Lanka, I used to connect to Internet using dial-up connection before ADSL came in. Then I felt "wow! ADSL is fast". But today here in IU, I would say "WOW! what a speed". See the picture below to see why I say this.




Windows7: Desktop Icons: CTRL + Wheel

I wanted to change the size of the icons in Windows7 desktop as they were bit larger than I like. The solution was a simple one, though I had to do some Googling to find it out.

Just scroll the mouse wheel while pressing CTRL key. That's easy :). In fact, it can be used in many other places like in windows explorer to change the way how items are showed.

Windows7 and Ubuntu 9.10

I just wiped out my Dell Insipiron E1505 notebook and installed Windows7 Professional and Ubuntu 9.10. I had enough of the Windows XP Media Center Edition. I thought of moving to Ubuntu 9.10 as well, just feel the fun.

Unlike in the previous experience with Windows, the Windows 7 performs really well. Regarding Ubuntu, it's better than 9.04 (I was happy with 9.04 as well). The only funny thing is that I had to find drivers and manually install my ATI Raedon X1300 VGA for Windows7. Earlier I used to do this for Ubuntu installations :)

For the moment, these two OSs seems to be a great combination if you are planning to get the best of both worlds.

Pidgin: Unable to Connect to Yahoo

Pidgin was giving trouble when connecting to my Yahoo account since recently. Today I got to know that it's because of this (http://www.celticwolf.com/useful-information/faqs/26-pidgin-yahoo).

Then I wanted to install a latest version of pidgin on my Ubuntu 9.04. I tried the "how to" given in the official pidgin site (http://www.pidgin.im/download/ubuntu/), but it was unsuccessful. Then I came across these debs (http://linux.softpedia.com/progDownload/Pidgin-Download-6.html) which solved the issue.

Just a quick how-to:

1. Download the i386 (or amd 64) debs
2. Download the two DEB ALL debs
3. Use dpkg -i to install the debs. Start with libpurple-bin_2.6.3-1~getdeb1_all.deb.
Then libpurple0_2.6.3-1~getdeb1_i386.deb (or amd 64 one).
Now move ahead with pidgin-data_2.6.3-1~getdeb1_all.deb.
Next pidgin_2.6.3-1~getdeb1_i386.deb (or amd 64 one)

That's it! no more troubles with Yahoo ;)

Design Defect: Dell E1505

See what has happened to the paint and you can understand the defect. Dell, you really need to think more on the paint material :)

Functional Vs Relational

After sweating my brain over functional programming in Prof. Daniel Friedman's class over the past several weeks, I got the chance to play with relational programming with miniKanren.

It took me some time to adjust my brain to accept the difference. Finally, I told myself

"Going to the grocer and paying for what you got is functional programming, but going to the grocer and handing over 10$ asking to give whatever that fits is logic programming"

Just a thought :)

Identify Ports: Weird Holes in Your Laptop

Ever wondered what is the purpose of a weird shape hole in your laptop? I did and luckily I found this nice site (http://techplore.com/technology/know-your-connectors-ports-a-visual-guide/) with all the info I needed.

Internet Explorer 8: Replacement for Chrome

After installing Windows7 on my machine, I went on installing my usual set of software including Google Chrome. But, I wanted to test InternetExplorer 8, which is the default browser, as well. So why wait, I started using it. Wow! I have to admit that it's cooler than Chrome. Why I say this mostly because it has a nice set of customizable accelartors. Also so far it is reliable than Chrome in Windows7. Moreover, it's way better than IE 7, which I consider as a pretty bad version of IE.


Jython Web Service Framework

My friend, Heshan, has done an interesting work to provide a framework extension to Axis2 which enables Jython based Web services and clients. Read more on his article (http://www.ibm.com/developerworks/web/library/wa-jython/)

Record Scheme Sessions: Transcript

Ever wanted to save what you type in your Scheme interpreter? I wanted :). So after a small Google search I found these nice two commands.

To start recording type,
(transcript-on "filename")

To end recording type,
(transcript off)

That's it. Now your session is saved in the file given by you.

BGT: The Humble Peformer

I've been watching Britain Got Talent (BGT) for some time now and I've never come across a performer so humble like Eugene.

Really touching video, yet happy for his courage to come forward.

Running Matlab Remotely: ssh -X

I wanted to run Matlab by logging into the university account remotely from my machine. Everything went fine except for the graphics. Matlab started in no graphics mode.

After bit of a search I found the solution. You have to set the X11 forwarding in you ssh configuration file. Here's how to do it.

1. cd /etc/ssh
2. sudo vi ssh_config
3. uncomment the lines "ForwardAgent" and "ForwardX11". Set their values to "yes"
4. sudo vi sshd_config
5. uncomment "X11Forwarding" and set it value to "yes" as well.

that's it and you are good to go.

Type ssh -X username@domain

To test if everything works fine try running xclock once you log in. It should open up a graphical clock window.

Funny Infinite Loop with C#

What will happen when you run the following C# code? It's a never ending loop. Oh! really? yea, note the "Name" inside set method. I have used uppercase N. Now it will call setter recursively.

Interesting isn't it? :)


public class Person
{
private String name;
public String Name
{
set
{
System.Console.WriteLine("assigning wow");
Name = value;
}
}
}


public class Hello
{
static void Main()
{
Person person = new Person();
person.Name = "wow";
}
}

Scheme Way: Eclipse Plug-in

I thought of searching for an IDE for Scheme, after being bit lazy to learn Emacs. Lucky enough I found a nice plugin for Eclipse named SchemeWay. It took me a bit of time, however, to configure and set up the plug-in to work as I like.

If you are struggling to set it up (as I did) here are few steps to help you with.

1. Download Eclipse from http://www.eclipse.org/downloads/. I chose the classic version

2. Download SchemeWay update pack from

3. Unpack the UpdateSite-1.3.0.alpha7.zip and copy the stuff inside plugins and features folders to eclipse features and plugins folders.

4. Start Eclipse and go to Help --> Install New Software.

5. Click Add on the on the Install window you get. It will give you a small window with two text boxes.

6. Click Local next to the Name text box. Now you can browse to your extracted folder of the SchemeWay update pack.

7. After couple of Ok presses Eclipse will show that it found the SchemeWay plugin. Then go ahead and install it.

8. Once everything is done, you can switch to the Scheme perspective from Window --> Open Perspective --> Other --> Scheme

9. Next task is to set the Scheme interpreter. I use the free version of Chez Scheme (i.e. Petite). So I have to set my interpreter as an external interpreter. To do this click Scheme --> Select Interpreter --> External Interpreter.

10. Now you have to give the necessary parameters to the plug-in to start your interpreter. To do this click Window --> Preferences. It will show you the preference window. On the left hand side of it you can expand the Scheme configurations. Select the External Interpreter configurations from there and set the necessary parameters.

Great! now you are good to go. Just create a new project and add a new Scheme source file. Then once you are done with typing your code, you can load it to the interpreter using CTRL+SHIFT+L.

You can play around a bit and get use to many other key short cuts.

One thing to note: you will have to set the indentation for some definitions to suit your style. You can do this by going to the same scheme configuration from Window --> Preferences.

Ubuntu 9.04: Way better than 8.10

I have used Ubuntu since it's version 6.04 simply because I felt that it is easy to work with. Anyway, for me, the versions x.04 never gave a good impression. So I used to say "hey! if it's not a x.10 version then it's not what I like". Interestingly, I am finding it is hard to say with Ubuntu 9.04.

Here's a list of things I felt really cool with 9.04.

1. No configuration necessary for the ATI drivers. Yea I had a really fun time configuring stuff with 8.04, 7.10, and 6.10 (Um, I can't remember what I did with 6.04).

2. External display detection is really awesome. It can even arrange the displays in any order I like (e.g. external one on top of default one).

3. Intel wireless card works like a charm.

4. Easy configurations for printers; hmm, I should really admire this.

5. Reliable (so far). Didn't crash, didn't reboot with errors, and most interestingly hibernate seems to work better than in previous versions.

6. Improved graphics.

In summary, I am beginning to like x.04 s as well :)

Scheme: Trace Functions

I found this really useful command in Scheme which helps to trace the function calls, while playing around it.

Say you have define a function named func. Now if you want to trace how it works when you invoke it, just type this.

> (trace func)

The next time you invoke func you will see the trace of function calls.

GSoC and UoM: Who let the "sharks" out

"...University of Moratuwa in Sri Lanka continues to dominate the field with 22 students accepted."

Wow! am I not happy to see this line in the Internet? I truly am. As a former student of University of Moratuwa, Sri Lanka, I am really happy to see the continuous achievement of its student in Google Summer of Code. To think of the fact that I too was a contributor to this success, makes me happy even more.

Keep up the good work "sharks"

Running Scheme on Ubuntu 8.04

Just hitting "scheme" in the console does no good if you are in Ubuntu 8.04. A workaround is explained here (http://ubuntuforums.org/showthread.php?p=4868292)

Here's the solution in brief:

sudo sysctl -w vm.mmap_min_addr=0

Now run scheme

Last Day at WSO2

It has been nearly 14 months since I joined WSO2. Gosh! I feel I joined just yesterday and I strongly believe that it is the wonderful community at WSO2 which made it so pleasant. Today, the time has come to say good bye, yet I am wondering how. It is hard to let go of a place you like.

I am truely grateful to Dr. Sanjiva Weerawarana for giving me the opportunity to work at WSO2 and supporting me to prepare for my future endeavors. Mr. Ruwan Linton played an invaluable role as my team lead and gave the confidence to move forward. Mr. Asankha Perara too did the same prior to Ruwan. My heartiest thanks for you two. I would like to give my sincere gratitude to the rest of the WSO2 team as well for being very much supportive throughout this time.

WSO2 a place like no other!