August 17th, 2008

Fibonacci Numbers in C/C++

So here’s another demonstration to show how slow recursive functions are.  I wrote three functions in C++ that calculates Fibonacci numbers in integer type.  Since my computer effectively supports only 32bit integer type, I calculated up to the 42nd Fibonacci number, which is 267914296. Continue reading Fibonacci Numbers in C/C++

August 15th, 2008

182,400 Files and 19,581 Folders

That’s how many data files I have in my computers.  I have 182,400 files in 19,581 folders, occupying 86,579,779,669 bytes or 80.6GB.  Most of them are pictures that I took (about 10,000 of them for 14GB), source codes (at least 100,000 files for 5GB), and many other small files that piled up in the years.  Some files are as old as dated in 1998.  However this doesn’t include all music files I ripped from my CDs, which is another 20GB or so.  I also store several movie’s ISO images on my computers so that I can move smoothly between scenes; they use another 30GB at least.  In addition, I have downloaded a bunch of service packs and hotfixes for Windows, device drivers, and other updates, which uses additional 10GB.  This results in the total of 140GB data in my hard drive.  Not to mention that this doesn’t include my system files.  My Windows Vista currently uses 25.3GB and this is the smallest system I can get with my Creative Design Suite (I bought it for $1800), Visual Studio 2005 Professional (MSDN-AA), and Office 2003 (partially 2007).  So I need at least 30GB if not 40GB allocated for the system drive.  Summing up, I need at least 170GB or approximately 172,000,000,000 bytes on my hard drive.  And guess what?  I had one 160GB hard drive in my computer for the last couple of years: ST3160827AS.  NO SPACE!!!  But not any more.  A few days ago, I got a brand new WD6400AAKS - a 640GB hard drive equipped with two 340GB platters.  It’s a fast and reliable hard drive with a big, a very big, in fact, a huge storage space of 640,000,000,000 bytes or 596GB.  So I’m living with a lot of space in front of me now.