Today is a special day — I was awarded for my work (related to NIC Teaming) and I am enjoying this day thoroughly :)
Some thoughts: the people I work with are … scary smart, and at the same time very kind (a rare combination).
I am very fortunate to have both: opportunity and means to contribute.
Thank you!

A prime number is divisible by 1 or by itself. To generate prime numbers to 20 we’ll use Sieve (of Eratosthenes) algorithm, which is really simple to explain:
Strike out all multiples of 2’s:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
Strike out all multiples of 3’s:
2 3 5 7 9 11 13 15 17 19
And so on. Here is a C# code that does exactly that:
private static void PrintPrimesTo(int num) {
var primes = new bool[num + 1];
// init candidates
for (int i = 2; i <= num; i++) { primes[i] = true; }
// cross-out 2's:
// 2, 4, 6, 8, 10...
// cross-out 3's:
// 9, 12, 15...
for (int i = 2; (i * i) <= num; i++ ) {
Console.WriteLine("Crossing out {0}'s to {1}:", i, num);
for (int j = i * i; j <= num; j = j + i) {
Console.WriteLine(" * crossing-out: {0}", j);
primes[j] = false;
}
}
Console.WriteLine("Results: prime numbers between 2 and {0}:", num);
for (int i = 2; i <= num; i++) {
if (primes[i]) Console.WriteLine(" * {0} ", i);
}
}
Read the rest of “Sieve (of Eratosthenes) algorithm for generating prime numbers” …
Did you know your iPhone/iPod software can display lyrics for songs?
Adding lyrics to your songs
You just need to make sure your mp3 files have “lyrics property” populated.
On your computer, open iTunes, right click on a song and choose “Get Info”. You should see this dialog:

Now click on “Lyrics” tab and add your text.
You can copy and paste lyrics text from websites, such as:
(Also, if you look around you’ll find software that will automatically add lyrics to all of your songs)
How to view lyrics on iPhone:
Once you’ve added lyrics to your songs and synced your phone, here is how you view it: when the song is playing, simply tab the screen once and it will overlay lyrics over album art!

Regular expressions (regex) let you search for a particular pattern. Regex consist of literal characters, and special characters, also called meta characters. Regex syntax has 2 modes, one inside of character classes, which is inside [ ] and one outsided of character classes. Read the rest of “Regex Notes” …
When I was in college, I had two computer classes in which we had to do a major final project. One of them was on relational databases and another on Java/Swing GUI programming. I also needed some kind of journaling software to keep track of my climbing and training. I wanted something that helped me visualize my progress and help me train more efficiently. So, I made Klimb, the very first Rock Climbing Training software. It helped me pass my classes, train smarter for comps and make some cash on the side!
Read the rest of “Making of Klimb, Rock Climbing Training Software” …