Category: post
-
Formatting text in Vim
The gq{motion} command will format a section of text. The ip motion selects the current paragraph, so gqip applies formatting to the current paragraph. Running the gq command moves the cursor to the end of the paragraph. If you want to keep the cursor on the same word, you can instead run the command gw.
http://vimcasts.org/episodes/hard-wrapping-text/
-
Difference between hg clone and hg pull (Backing up Mercurial Repository)
hg clone will make a new repository (.hg).
hg pull will pull changeset from the depository to the current *existing* repository.So hg clone can be used at first if you want to backup your repository and afterthat, use hg pull to update the backup.
-
Install BioPerl
When you have a problem during installing BioPerl using CPAN, use the -H option. It will initialize Home environment. With this option, I managed to install BioPerl on my Mac OS X 10.5 Leopard.
sudo -H cpan
-
Why Perl?
I’ve decided to give a try to Perl as a programming language for my bioinformatics study.
Why? Because I’m used to it. 🙂
Well, that’s not all of the reason but it is one of the reasons that I chose Perl.
I compared three languages before the decision; Perl, Python, and Java.
Java is a good one especially to make a nice looking program with GUI. But most of my program is used for research so it will be used by small number of people. They can put up with not-so-shiny GUI. Also the program needs to be modified frequently. Java doesn’t seem to be fit in the purposes.Then Python and Perl. I’ve heard a lot of good calls about Python. My biggest concern about Perl is that often times I had difficulties to read other’s code. There are many different ways to do a same thing in Perl. I can stick to a way but when I have to read other’s code, it does not guarantee that the others wrote the program the same way I did. I have to understand those many different ways. Python claims clean syntax and easier to read code. I checked out some introduction and tutorials. Even though it seems to be nice and many developers are working on/with it, I decided to give another try to Perl.
I found Damian Conway’s book, ‘Perl Best Practices‘. Following the guide solves many problems about the hard-to-read coding problem of Perl. The book itself does not force all others in my lab to follow the guidelines but at least it can be a bottom line. Also the fact that I’ve used Perl for years affected my decision. Those hours I spent to learn and use will count toward my 10,000 hours experiences. I found that even though I didn’t used it for past several years, my fingers still remember many of them. If I start to use another language, it is a whole new start from the scratch.
So I decided to try Perl one more time.