Saturday, April 19, 2008

Notepad++ minus Comic Sans

'Unfortunately, I (Notepad++ author) am one of very few users who like "Comic Sans MS" font.
So just remove Comic Sans MS font from your system, it will be a easier solution for both of us.'
- Notepad++ FAQ Page

Now Comic Sans is a very good font I agree, but every font has its purpose. Having Comic Sans showing up on text files make them ridiculously difficult to read. Unfortunately, comments in any language are set to Comic Sans by default - and the reason is perhaps what I've quoted above from Notepad++ FAQ.

Well, even though the author of Notepad++ is touchy about this subject, there is no reason to remove either Comic Sans or Notepad++ from your system. Here's how you change the default.
1) Go to %APPDATA%\Notepad++ folder. (%APPDATA% usually refers to "C:\Documents and Settings\\Application Data" in Windows XP.)
2) Here you'll see a file called styles.xml. Open it with Notepad++.
3) Replace all "Comic Sans MS" (including quotes) with "".
4) To make matters worse, comments are not only Comic Sans, but also set with a different font size. Just replace all fontSize="8" to fontSize="" and you're done!
5) Save the file and restart Notepad++.

And you're done! Notepad++, an excellent tool, is now the way it should be!

Sunday, April 6, 2008

The Man From Earth - Score: 10/10

This movie is about a man John, who claims that he is 14,000 years old. He is among his friends who have known him for a few years when he came to the town. The friends are all teachers by profession, as is John. Initially although they take it as a joke, they are baffled as John answers any question he is posed to their satisfaction without a moment's pause.

The movie deals with science, mystery, religion.

Although it doesn't deal with aliens, space travel and such, it somehow made me vaguely remember Star Trek. Once the movie was over, I knew why. It was as well written, and nicely presented as many of the best episodes of Star Trek. And the author contributed to more than one of Star Trek stories.

I give it 10/10. A must watch for anyone.

Saturday, March 29, 2008

KTorrent vs Bittornado, Deluge, Transmission, rTorrent

Torrent client for Linux? KTorrent! KTorrent is based on the interface that the most popular client for Windows - uTorrent provides, but it is not just a clone, KTorrent cannibalizes uTorrent and improves upon it.

KTorrent is built using the KDE library, and hence it is a KDE application. Of course like thousands of other KDE apps it runs on Gnome. However, typically when people (including me) are using Gnome they prefer to use Gnome applications. Here's why I've chosen KTorrent over other linux torrent clients, all of which you can download through apt-get or synaptic.

Bittorrent/Bittornado - Too simple a client. Doesn't have most options, the Gui is very limited. Only reason to use it would be for really old computers which can't power newer GUI, but there too you're probably better off with rTorrent.
Get it in Ubuntu: sudo apt-get install bittornado-gui

rTorrent - Text based torrent client. It can run the main torrent daemon at the background, text (ncurses) interface connecting to it as and when necessary. Very powerful, but I found the text based + scripted interface too complicated. If I had no other option, I'd probably spend more time on learning to use this interface and go with it. Only one caveat: it doesn't work with NTFS drives.
Get it in Ubuntu: sudo apt-get install rtorrent

Deluge - This is one good client for Gnome. However, since it is built using Python which can be slow in slower computers, and it follows the Gnome 'keep it simple' philosophy, the developers are not ready to add more GUI features. I've myself submitted a patch which would show a torrent bar like uTorrent/KTorrent where you can see which exact part of the torrent has been downloaded as opposed to a single statusbar. I and some other developers thought it was cool but one of the project owners was reluctant to accept it - so I concluded it's not the client for me.
Get it in Ubuntu: sudo apt-get install deluge-torrent

Transmission - This is the default torrent client for Ubuntu Hardy Heron to be released on 2008 April. I seriously do not know why this was chosen, as transmission doesn't yet support DHT. For those who don't know, DHT means distributed hash table, a method which allows a torrent to go on when once started without requiring the main server. If a torrent client doesn't support DHT, it won't be able to search for peers to connect who are outside the list of servers it has, in effect reducing the speed. Irrespective of your Internet connection bandwidth, most often you'll see a dramatic increase in speed for a DHT supported client than a non DHT. So Transmission is a strict no no. First thing you do after installing Hardy is remove Transmission and install something that is more capable, like KTorrent.
Get it in Ubuntu: sudo apt-get install transmission-gtk

Azureus - Never used it myself, but the complaints I've got about it is that it's a major resource hog. Also since it's written in Java, you'll the Java VM loaded in your memory as long as it runs.
Get it in Ubuntu: sudo apt-get install azureus

KTorrent - Now this is the one torrent client for linux that has all. Doesn't matter if it is made for KDE, the package manager will install required KDE libraries automatically to let it run in Gnome. Now you have access to DHT, NAT traversal, support for loading large ban lists, a very nice and informative GUI, hoard of configuration options that you can set without needing to script, and the ability to control KTorrent from terminal. The last thing is what I needed the most, when I figured out how I can connect to my computer from a remote place - as I wanted to control the torrent client remotely. This is how you control KTorrent from terminal:
Once you have a copy of KTorrent running, you can use the "ktshell" program (installed with KTorrent) from the command line, to control it from terminal. If you're connecting through SSH, you'll have to type the following line to let ktshell know which display KTorrent is running: "DISPLAY=0; export DISPLAY". And then you're all set!
Get it in Ubuntu: sudo apt-get install ktorrent

Verdict: KTorrent. If your system is really old and can't run KTorrent, and you're not writing into NTFS disk, then go for rTorrent.

Firefox 3 Beta 4

Firefox 3, although currently it is Beta 4 (download), is good. Two things I like about it is that it uses less memory, and it actually allows you to see the result of your password before prompting to save it. Also has revamped bookmarking system and different icons - but these I don't really care about much.

The only drawback is absence of support for FF2 addons which effectively limit functionality.

Here are the 3 things I'm looking for in FF3 before I change from FF2:

1. Undo close tab
FF3 supposedly has this, but the recent tabs in History is disabled. This can be obtained in FF2 through Tab Mix Plus.

2. Open tabs to the right of current tab
True a very simple feature, but helps tremendously in organizing tabs. Again through Tab Mix Plus.

3. Del.icio.us addon
It is the one service which I rely on and which has yet not been upgraded to support FF3.

Hope these changes are done soon. Till then, I'll keep an eye on the compatibility of addons, and I'll stick to FF2.

Monday, March 3, 2008

Bathroom - Chandrabindu

This is one of the most hilarious songs I've heard - truly a masterpiece. However I couldn't find the lyrics online, so this post. Along with it is provided an English translation; though admittedly my translation doesn't do justice to the original lyrics.

Lyrics (Bengali)
Ek English medium school - Kora disciplin'er dhoja ore
Half pant pora sir onker class nen, Miss dhoke miniskirt pore.

Tumi Banglae bolbena kotha - Tumi tiffin-e khabena paurooti
"Faster!" fifth period-e jodi Miss bole bathroom jabe guti guti.

Kochi chheleder chokh holo tera - Bandhobi der dress dekhe -
Sei frustation-e bathroom-e dewal-e hijibiji aanke aar lekhe

Ekdin sundor sokale - Erokomi naami daami school-e
Third period-e dekha gelo ek chhatro chhotto kore aangul tule

"Tumi first period-e giye chhile na? Aar third period-e pelo abaar!"
"Bose thako chepe chupe" - pant bhije chupchupe - "Ek chore kore debo sabaar!"

[Music changes to recognize the situation]
Bondhura dekhe hese hese - aar prokitio dake bhalo beshe!
Pet tar phete jae - somoe je kete jae - ebare benchi jaabe bheshe!

Tolpete hoe khub jatona! Tai mone jaage biplobi chentona!
"Aantio choto chilo. School-e jeto. Class-e jeto. Tokhon ki tar kichu petona?"

[Music back again]
Obosheshe jege othe shoshito. Didimoni aasole doshi to!
Sogorbe korilo se ghoshona - "Aami first period-e giyechilam!
Aar third period-e jaabo abaar. Jete dibi na keno didimoni tui, bathroom ta ki tor babar?"

Lyrics (Translated into English)
An English medium school - the flagship of strict discipline -
Sir in half pants takes the math class, Miss comes in miniskirts.

You won't use the regional language - you won't have "paurooti" in your tiffin

"Faster!" Miss shouts, if in the fifth period you're wasting time going to the bathroom slowly.

Eyes of boys the roll-up - having looked at the dresses their female colleagues wear
In that frustation, they aimlessly scribble and write the walls of the bathroom.

In one such reputed school in a beautiful morning,
You could see a little boy raising a little finger in the third period .

"Didn't you already go in the first period? And you want to go again in the third period!"
"Hold it and keep quiet!" - But his pant will be drenched - "One slap and you'll learn your lesson!"


[Music changes to recognize the situation]
Friends are enjoying the situation with wide grins.
And nature is also calling very lovingly.
His stomach's almost going to burst - time ticks away very slowly -
Soon enough the bench is definitely going to get wet!

Unbearable pain in the lower abdomen - puts revolutionary ideas into his brain.
"Aunty was also small once, she too went to school and attended classes - didn't she ever need to go then?"

[Music back again]
Finally rose the wronged - With the realization that aunty is a real sinner,
And proudly he stated, "Yes I went in the first period!
And I want to go again in the third! Why would you stop me, dear miss, does the bathroom belong to your father?!"

Saturday, February 16, 2008

Capturing Mouse Wheel event in C#

Not sure why, but MS chose not to display the MouseWheel event in the Event box. However, it is quite easy to hook it through the editor.

Assuming you're using Visual Studio 2005 or 2008, it's an one step process, really -

1. In the constructor of the Form / custom control, type - "MouseWheel+=", and press TAB twice. Once for completing the statement, and again to insert the handler in the class.

It's that easy! Told you, it's one step process.

Sunday, February 10, 2008

Netgear: Configuring for BSNL Dataone

I had no choice so I had to take BSNL (as stated in the previous post), but when the supplied modem broke (and also since I wanted an wireless router which they never seemed to have in stock) I chose to buy a separate router instead of waiting for BSNL to fix it.

The modem that I bought, is actually an ADSL router from Netgear. Model number is DG834G v3, but as I bought it about 6 months ago, if you buy one now you'll most likely get a future version. It has a wireless port, as well as 4 Ethernet ports. Also Netgear, unlike UT Starcom (the brand of modem that BSNL provided me), has an active website with support, documentation, and firm wire updates. And needless to say, I didn't face any problem from it. It is a hell of a modem. If you don't believe me check out some of the reviews in Google.

Here are the configurations for BSNL Dataone connection. This configurations are mentioned for Netgear, although it should work with any other modem too - only the order and the naming may not exactly match.

1) Basic Settings
Does Internet connection require a login? Yes
Encapsulation: PPPoE
Login: [your username without the '@bsnl.in' part]
Password: [your password]
Service name: [you may choose to leave it empty, or optionally put 'bsnl.in' here]
Idle timeout in minutes: 0
Internet IP Address: Get dynamically from ISP
Domain Name Server: Use these DNS - choose any two from the following list of DNS
BSNL DNS: 61.1.96.69, 61.1.96.71, 218.248.255.145, 218.248.255.193
Alternatively, if the above is not working for some problem you can choose Open DNS which is slower, but sometimes more reliable - 208.67.222.222, 208.67.220.220. However it is advisable to switch over to BSNL DNS whenever possible, as it would be much faster for a BSNL connection.
NAT (Network Access Translation): Enabled

2) ADSL Settings
Multiplexing Method: LLC-BASED
VPI: 0
VCI: 35
DSL Mode: ADSL2+

After these your Internet connection should work. To change any other configuration of the modem, and also for help on the configuration options mentioned above, you can scroll through the Help section that comes in blue on the right side of the page as you adjust the settings.