Monthly Archives: March 2007

“Hello World” screencast

I have about 6 screencasts uploaded here: http://showmedo.com/videos/series?name=fXRfVLC1J

Advertisements

Telecommunications Articles

A good article on BER is available here. Other good telecommunication articles from the same website are:Selected Comments on Scrambler Security, Analog Tone Detection using the Quadrature Receiver, and Digital Phase Modulation

Thoughts on my favorite software tools

Vim is the excellent cross-platform editor that lets me achieve dhyana(Zen) while programming.

Preparing documents with LaTeX (using Vim of course) similarly lets me concentrate on my task without worrying about the irritating formatting details while composing.

To be quite honest, after I have gotten used to these two tools, I feel cramped and inefficient whenever I have to use a non-modal editor or a WYSIWYG(“What is see is what you get”) editor like Word.

By the way, for those who don’t want to jump in head-first into LaTeX, LaTeXiT is an excellent app for generating image files that can be put inside Word documents, etc.

Exploring Analog QAM modulation with Grapher

Caveat: This is NOT meant to be a rigorous explanation of QAM. You can read a book like Telecommunication Breakdown or Principles of Communications by Ziemer and Tranter for such explanations(of course, Wikipedia also works at times). These three plots are just meant to build intuition.

Note: Message signals in general are NOT sinusoids! (sin(x) or cos(x))

Enjoy. Click on the thumbnails to enlarge the graphs. Of course, there is no noise effect and no demodulator plots shown here.

First step: y = sin(x)*sin(50x)

Second step: y = cos(x)*cos(50x)

Third step: y = sin(x)*sin(50x) + cos(x)*cos(50x)

A quick way to make screencaptures is to press Apple-Shift-3(the screenshot will be put on the Desktop)

Boot Camp Update for Windows Vista

Allright, according to this article from macnewsworld, the latest boot camp update lets you dual-boot Vista along with Mac OS X(though I personally prefer OS X, I do have a few apps for which I have to use Windows.) I also write little-bitty Windows apps from time to time.

Podcasts and Screencasts related to Aaron Hillegass’s book

Check it out.

Exploring Bioinformatics with Ruby

Update, April 4th: I wrote a quick explanation for some of the code here

I wrote a script some time ago that ported the examples in this Python article to Ruby(check out BioRuby for a large scale approach to Bioinformatics). Some sparse documentation can be found at my old(but still usable website) here. Note that I do not actively update the website where the documentation is being kept.

NOTE WELL:

This code is not very well-tested yet, so watch your head. This code is licensed under GPLv2. You can read the license and disclaimers here. VIEWING TIP: In Mac Firefox press Apple++ to enlarge the viewing size.

#!/usr/bin/env ruby
#==Bioinformatics Usage Examples
#Instantiate a DNA object
#=Constructor
#d = DNA.new(“CGGGG”) => DNA object
#=Reversing a strand
#d.reverse => “GGGGC”
#=Finding the complement
#d.complement => “CCCCG”
#=Find the codons in a given strand
#d.codons => [“CGG”]

class DNA
#Holds the base complement information for all instances of the class
@@basecomplement = {a => t, c => g, t => a, g => c}

def initialize(s)
#Example: d = DNA.new
@seq = s.downcase
@len = s.length
end

#Return as RNA string
#Example d.transcribe
def transcribe
@seq.gsub(t,u)
end

#Return DNA string in reverse order
def reverse
@seq.reverse
end

#Internal function (do not use)
def reverse!
@seq.reverse!
end

#Complement function
def complement
compl(@seq)
end

#Internal function (do not use)
def compl(s)
s = s.split(/\B/).to_a.collect!{|base| @@basecomplement[base]}.to_s
end

#reversecomplement function
def reversecomplement
reverse!
complement
end

#statistics function
def gc
gc = @seq.count(g) + @seq.count(c)
gc * 100.0 / @seq.length()
end

#Get patterns of three bases
def codons
codons = Array.new
ending = @len – (@len % 3) – 1
0.step(ending,3){|i| codons.push(@seq[i..i+2])}
return codons
end
end

if __FILE__ == $0
d = DNA.new(CGG)
puts(d.reverse())
end